package cn.terminus.data.customer.custompurposeroom.dao;

import cn.terminus.common.customer.bean.custompurposeroom.dto.*;
import cn.terminus.result.common.page.TerminusPageAble;
import cn.terminus.result.common.page.TerminusPageInfo;

import java.util.List;

/**
 * (CustomPurposeRoom)表服务接口
 *
 * @author makejava
 * @since 2021-07-08 11:18:58
 */
public interface CustomPurposeRoomDao {

    /**
     * 新增
     *
     * @param dto
     * @return
     */
    Integer add(CustomPurposeRoomNewDto dto);

    /**
     * 更新
     *
     * @param dto
     * @return
     */
    Integer update(CustomPurposeRoomEditDto dto);


    /**
     * gets
     *
     * @param dto
     * @return
     */
    List<CustomPurposeRoomResultDto> gets(CustomPurposeRoomGetsDto dto);

    /**
     * 删除
     *
     * @param dto
     * @return
     */
    Integer delete(CustomPurposeRoomDeleteDto dto);

    /**
     * 查询
     *
     * @param dto
     * @return
     */
    List<CustomPurposeRoomResultDto> query(CustomPurposeRoomQueryDto dto);

    /**
     * 分页查询
     *
     * @param dto
     * @param page
     * @return
     */
    TerminusPageAble<CustomPurposeRoomResultDto> page(CustomPurposeRoomQueryDto dto, TerminusPageInfo page);

    Integer addMulti(List<CustomPurposeRoomNewDto> customPurposeRoomNewDtoList);

    List<CustomPurposeRoomResultDto> queryByContractIdsAndType(CustomRoomInfoGetDto roomInfoGetDto);

    Integer deleteByContractIds(List<Long> contractIds);

    Integer countContractRooms(List<Long> roomIds);

    Integer deleteByCustomerId(CustomPurposeRoomDeleteDto dto);
}
